package com.luoye.lj.pojo.vo;

/**
 * 类标题：全局异常枚举类
 * 类说明：
 * 用户服务相关异常3000开头，如30001.
 * 发布服务相关异常4000开头，如40001.
 * 订单服务相关异常5000开头，如50001.
 * 统计服务相关异常6000开头，如60001.
 * 运行时异常子异常相关2000开头，如20001
 * 数据库相关异常1000开头，如10000
 *
 * @author luo
 * @date 2018/11/23
 */
public enum GlobalExceptionEnum {

    /**
     * 1000_	数据库相关异常
     */
    SQL_EXCEPTION(10000, "出了点小状况QAQ…"),
    /**
     * 2000_	运行时相关异常
     */
    UNKNOW_EXCEPTION(20000, "出了点小状况QAQ…"),
    FEIGN_CALL_EXCEPTION(20001, "FEIGN调用异常"),
    NULL_POINTER_EXCEPTION(20002, "空指针异常"),
    ARRAY_OUT_OF_BOUNDS_EXCEPTION(20003, "ARRAY越界异常"),
    STRING_OUT_OF_BOUNDS_EXCEPTION(20004, "STRING越界异常"),
    JSON_EXCEPTION(20005, "JSON异常"),
    PARAMETER_CHECK_EXCEPTION(20006, "参数校验异常"),
    Arithmetic_EXCEPTION(20007,"计算异常"),
    PAY_FAIL(80002, "支付失败");

    private int code;
    private String message;

    GlobalExceptionEnum(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
